#pragma once

#include "controlcenter_global.h"
#include "roammanipulator.h"

namespace ControlCenter
{
	class CONTROLCENTER_EXPORT AttachObjectManipulator:public RoamManipulator
	{
	public:
		AttachObjectManipulator();

		void objectTransformInitThis(const osg::Vec3& eyepos,const osg::Vec3& pos,const osg::Vec3& offset,const osg::Vec3& rota,const osg::Vec3& up);
		void setObjectTransform(const osg::Vec3& pos,const osg::Vec3& rota);

		virtual void home(double);
		virtual osg::Matrixd getInverseMatrix() const;
		//virtual void setOperatorObjectVector(QVector<CoreBase::ActorBase*> objvector);
		//virtual void setLookAt(std::vector<osg::Vec3> data,bool rightaway){}
		//virtual void setLookAt(const osg::Vec3& vec,const osg::Vec3& rota,float upangle,float sideangle,float distancevalue,bool rightaway){}

	protected:
		virtual ~AttachObjectManipulator();
		void _frame();
		osg::Vec3							_baseEye;
		osg::Vec3							_baseUp;
		//osg::Vec3							_objectTransformChanged;
		//osg::Vec3							_objectRotationChanged;
		osg::Vec3							_directionBase;
	};
}